<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- author: suyao -->
<title>指标超市</title>
<#include "dev/tpl/common/common_css.tpl" />
</head>
<body>
<!---header---->
<!-- headerTPL -->
	<#include "dev/tpl/common/headerCommon.tpl" />
<!---header end---->
<div class="mainpalce" id="mainPlace">
<div class="tabBox" onmouseleave="$('#subplace').hide();">
	<ul class="tabInd">
		<li class="allclass" >
			<span style="width: 75px;height: 35px;font-size: 14px;" >所有分类</span>
        	<div class="subsety_tabInd">
            <div>
            	<div class="leftclass_tabInd" id="folderHead">
                </div>
                <div id="subplace" style="display: none">
                </div>
            </div>
            </div>
        </li>
        <ul id="userFolder" >
		</ul>
	</ul>
	
</div>

<div class="contentIndicator">
	<div class="classify">
		<p>所有分类  >   </p>
		<ul id="selectTip">
		</ul>
		<p class="classifyTotal">共 <span></span> 条数据</p>
	</div>

	<ul class="selectBox">
	
	</ul>
	
	<div class="moreDown">
			<p></p>
			<em onclick="Multi_Select.moreDownAndUp(this);"></em>
	</div>

	<div class="assemblyBox">
		<ul class="sort">
			<li class="sortOn" id="sortByTime" onclick="Idx_Store.sortIdxInfo(this);">最新</li>
			<li class="sortnorm" id="sortByCollection" onclick="Idx_Store.sortIdxInfo(this);">关注</li>
			<li class="sortnorm" id="sortByClick" onclick="Idx_Store.sortIdxInfo(this);">点击</li>
		</ul>

		<div class="assembly">
			<a style="cursor: pointer;" onclick="location.href='../indexAssembly/indexAssembly.html'" target="new">指标组装单</a>
			<div class="assemblyNumber"></div>
		</div>
		
	</div>
	
	<div class="noquery_common" id="noquery_common">
		<div class="nocontent_query">抱歉，根据您的输入的条件查询不到数据，请重新输入条件</div>
	</div>
	
	<ul class="inspectDetl">
		
	</ul>
</div>

</br>
<div id="pagenationStyle" style="background:#efefef;border:1px solid #ccc;margin: 0 auto;width: 1200px"></div>
</div>

<div class="waterMark" id="div_waterMark"></div>
<div class="loader" id="div_loader" style="display: none;">
	<img src="../../assets/images/common_loading.gif"/>
</div>

<!---footer-->
	<#include "dev/tpl/common/footerCommon.tpl" />
<!---lfooter结束-->	
<!---指标详情-->    
<div class="popupIn_odd" id="indexInfoDetail" style="display:none;position: fixed; " >
		
</div>
<!--folder头加载模板 -->
<script id="IDX_FLODER_HEADER" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		<h1 id="{{id}}" value2="{{name}}" class="dragitem" onclick="Multi_Select.selectClassTip(this);" onmouseover="$('#subplace').show();$('.subsetinter').hide();$('#sub{{id}}').show();"><sub>></sub>{{name}}</h1>
    {{/each}}
{{/if}}
</script>

<!--folder子级加载模板 -->
<script id="IDX_FLODER_LEVELTWO" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		 <div class="subsetinter" id="sub{{id}}">
					{{#each child}}
	                	<ul>
	                		<strong id="{{id}}" value2="{{name}}" onmouseup="Multi_Select.selectClassTip(this);">{{name}}<i>></i> </strong>
	                		<span>
								{{#each child}}
	                				<li id="{{id}}" value2="{{name}}" onmouseup="Multi_Select.selectClassTip(this);">{{name}}</li><sub></sub>
	                			{{/each}}
	                		</span>
	                	</ul>
					{{/each}}
	      </div> 
    {{/each}}
{{/if}}
</script>

<!--folder用户定义加载模板 -->
<script id="IDX_FLODER_USER" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		<li><p id={{id}} value2="{{name}}" onclick="Multi_Select.selectClassTip(this);">{{name}}</p><i class="close_tab" onclick="Load_Folder.removeUserTip(this);"></i>
        	<div class="subsetx_tabInd">
        		<div class="subsetinter1">
                	{{#each child}}
	                	<ul>
	                		<strong id="{{id}}" value2="{{name}}" onclick="Multi_Select.selectClassTip(this);">{{name}} <i>></i> </strong>
	                		<span>
								{{#each child}}
	                				<li id="{{id}}" value2="{{name}}" onclick="Multi_Select.selectClassTip(this);">{{name}}</li><sub></sub>
	                			{{/each}}
	                		</span>
	                	</ul>
					{{/each}}
                </div>
            </div>
        </li>
    {{/each}}
{{/if}}
</script>

<!--指标最新详细信息加载模板 -->
<script id="IDX_DET_INFO" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		<li id="detInfo{{idxId}}" value2="{{versionCode}}">
			<div class="leftText">
				<div class="article">
                	<em class=" icon_index"></em>
					<p><a href='../indexPanel/indicatorPanel.html?idxId={{idxId}}&verCode={{versionCode}}' target="_blank">{{idxName}}</a>
						<span class="detail" onClick="Idx_Store.elementDisplay('{{idxId}}')"></span>
					</p>
					<ul class="stars{{lvlCode}}">
						<li></li>
					</ul>
					<div class="visitdate">
						<span class="visited">访问量：{{visitCnt}}</span>
						<span>创建日期：{{createTime}}</span>
					</div>
				</div>
				<h2>指标业务口径：{{busiRule}}</h2>
				<h2>维度：{{dimName}}</h2>
				<h2 class="collect">
					<p>需求人：{{demandUserName}}</p>
					<p>需求部门：{{demandDept}}</p>
					<p>收藏量：{{userCnt}}</p>
				</h2>
			</div>
			<div class="rightButton1">
				{{#if_even isFollow}}
					<button type="button" id="addAtten{{idxId}}" onclick="Idx_Store.showAtten(this,'{{idxId}}');">关 注</button>
					<button type="button" id="cancelAtten{{idxId}}" onclick="Idx_Store.cancelAtten(this,'{{idxId}}');" style="display: none">取消关注</button>
				{{else}}
					<button type="button" id="addAtten{{idxId}}" onclick="Idx_Store.showAtten(this,'{{idxId}}');" style="display: none">关 注</button>
					<button type="button" id="cancelAtten{{idxId}}" onclick="Idx_Store.cancelAtten(this,'{{idxId}}');">取消关注</button>
				{{/if_even}}
					<button type="button">预 警</button> <br />
				{{#if_even isAssemble}}
					<button type="button" class="buttonAdd" onclick="Idx_Store.addIndexAssemble('{{idxId}}',this);">+加入指标组装单</button>
				{{else}}
					<button type="button" class="buttonAdd_already" onclick="location.href='../indexAssembly/indexAssembly.html'">进入组装单</button>
				{{/if_even}}

				<div class="pop_attetion" style="display: none">
					<em class="close_pop" style="cursor: pointer" onclick="$(this).parent().hide();$(this).parent().find('div').find('i').text('分类到');$(this).parent().find('div').find('span').hide();"></em>
					<h1><em class="okicon"></em>请选择加入指标看板！</h1>
					<div class="select_attetion">
						<i id="" style="font-style: normal;" onclick="Idx_Store.showAttenFolder(this);">分类到</i>
						<span class="drop_select_attention1" >
							<ul id="attenFolder{{idxId}}" value="{{idxId}}">
							
							</ul>
							<p onclick="Idx_Store.addAttenClass(this,'{{idxId}}');"><sub class="add_icon"></sub>添加分类</p>
						</span>
					</div>
					<button type="button" class="button_blue" onclick="Idx_Store.addAtten(this,'{{idxId}}');" style='margin-top:0px;'>确定</button>
				</div>
			</div>
		</li>
    {{/each}}
{{/if}}
</script>

<!--用户关注指标分类加载模板 -->
<script id="IDX_USER_ATTEN" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		<p><input name="userAttenRadio" type="radio" value="{{folderId}}">{{folderName}}</p>
    {{/each}}
{{/if}}
</script>

<!--指标详细信息加载模板 -->
<script id="IDX_DETAIL_INFO" type="text/x-handlebars-template">
{{#if this.length}}
    {{#each this}}
		<h1 class="articlePop"><span class="title_x">{{idxName}}</span>
    	<div class="version">版本:
			<span class="select_vs">{{versionCode}}</span>
            <div class="dropdown_vs" value="{{idxId}}">
				{{#each versionInfo}}
					<p onclick="Idx_Store.changeIndexVersion(this,'{{versionCode}}');">{{versionCode}}</p>
				{{/each}}
            </div>
        </div>
    </h1>
	<ul class="contentPop">
		<li>指标ID：<span>{{idxId}}</span></li>
		<li>需求人：<span>{{demandUserName}}</span></li>
		<li>需求部门：<span>{{demandDept}}</span></li>
	</ul>
	<ul class="contentPop">
		<li>指标周期：<span>{{cycleName}}</span></li>
		<li>指标单位：<span>{{unitCode}}</span></li>
		<li>指标格式：<span>{{fomatName}}</span></li>
	</ul>
	<ul class="contentPop">
		<li>指标精度：<span>{{precisionCode}}</span></li>
		<li>版本：<span>{{versionCode}}</span></li>
		<li>指标数据源：<span>{{sourceSysName}}</span></li>
	</ul>
	<ul class="contentPop">
		<li>指标实体名称：<span title="{{sourceTableName}}">{{sourceTableNameMini}}</span></li>
		<li>指标实体属性：<span title="{{columnName}}">{{columnNameMini}}</span></li>
		<li>指标维度：<span title="{{dimName}}">{{dimNameMini}}</span></li>
	</ul>
	<ul class="contentPop">
		<li>指标分类：<span title="{{idxFolderPath}}" style="">{{idxFolderPathMini}}</span></li>
		<li>访问量：<span>{{visitCnt}}</span></li>
		<li>收藏量：<span>{{userCnt}}</span></li>
	</ul>
	<ul class="caliber">
		<li class="liTitle">指标业务口径：</li>
		<li class="liContent">{{busiRule}}</li>
	</ul>
	<ul class="caliber">
		<li class="liTitle">指标技术口径：</li>
		<li class="liContent">{{techRule}}</li>
	</ul>

	<div class="popDown">
		<button type="button" onClick="document.getElementById('indexInfoDetail').style.display='none'">关 闭</button>
	</div>
    {{/each}}
{{/if}}
</script>

<!-- //对选框加载模板 -->
<script id="IDX_MULTI_SELECT" type="text/x-handlebars-template">
	{{#if this.length}}
		{{#each this}}
			<li class="dateSelect inputBlock" id="{{id}}" style="display:none">
				<strong value="{{key}}">{{name}}:</strong>
				<!-- 单选框 -->
				{{#if_eq displayCode compare="1"}}
					<div class="selectMore">
						 <!--有更多设置-->
						{{#if_eq moreFlag compare="1"}} 
						 <!--少量展示-->
						<form id="lessSelect{{id}}" value="{{id}}">
							{{#if lessDimInfoList.length}}
    							{{#each lessDimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
						</form>
						 <!--全部展示-->
						<form id="moreSelect{{id}}" value="{{id}}" style="display: none"> 
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
						</form>
						{{else}} 
						 <!--没有更多设置-->
						<form id="select{{id}}" value="{{id}}" style=""> 
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
						</form>
						{{/if_eq}}
					</div>
					<div class="btnRight">
						{{#if_eq moreFlag compare="1"}}
						<em id="btnMoreSel{{id}}" class="btnRight2" value="{{moreFlag}}" onclick="Multi_Select.changeLessShowMode(this,'{{id}}',1);">更多</em>
						<em id="btnLessSel{{id}}" class="btnRight2" value="{{moreFlag}}" onclick="Multi_Select.changeLessShowMode(this,'{{id}}',2);" style="display: none">收回</em>
						{{/if_eq}}
					</div>
				{{/if_eq}}
				<!-- 多选框 -->
				{{#if_eq displayCode compare="2"}}
					<div class="selectMore">
						 <!--有更多设置-->
						{{#if_eq moreFlag compare="1"}}
						<!-- 少量展示 -->
						<form id="lessSelect{{id}}"  sytle="display: none;">
							<!-- 少量单选 -->
							<div id="singleLessSel{{id}}" value="{{id}}" style="display: ;"> 
							{{#if lessDimInfoList.length}}
    							{{#each lessDimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
							</div>
							
							<!-- 少量多选 -->
							<div id="multiLessSel{{id}}" value="{{id}}" style="display: none;">
							{{#if lessDimInfoList.length}}
    							{{#each lessDimInfoList}}
								<label><input type="checkbox" value="{{id}}"/>{{name}}</label> 
								{{/each}}
								<span style="font-variant-position:20px">
									<input type="button" class="button_blue" onclick="Multi_Select.selectMoreTip(this,'{{id}}');" value="提交"/>
								</span>
							{{/if}}
							</div>	
						</form>
						
						<!-- 全部展示 -->
						<form id="moreSelect{{id}}" style="display: none;"> 
							<!--全部单选-->
							<div id="singleMoreSel{{id}}" value="{{id}}" style="display: none;">
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
							</div>
							<!--全部多选-->
							<div id="multiMoreSel{{id}}" value="{{id}}" style="display: none;">
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><input type="checkbox" value="{{id}}" />{{name}}</label> 
								{{/each}}
								<span style="font-variant-position:20px">
									<input type="button" class="button_blue" onclick="Multi_Select.selectMoreTip(this,'{{id}}');" value="提交"/>
								</span>
							{{/if}}
							</div>
						</form>
						{{else}} 
						 <!--没有更多设置-->
						<form id="select{{id}}" style="dispaly: none;"> 
							 <!--单选-->
							<div id="singleSelect{{id}}" value="{{id}}" style="display: ">
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><p value="{{id}}" onclick="Multi_Select.selectSingleTip(this);">{{name}}</p></label> 
								{{/each}}
							{{/if}}
							</div>
							<!--多选-->
							<div id="multiSelect{{id}}" value="{{id}}" style="display: none">
							{{#if dimInfoList.length}}
    							{{#each dimInfoList}}
									<label><input type="checkbox" value="{{id}}"/>{{name}}</label> 
								{{/each}}
								<span style="font-variant-position:20px">
									<input type="button" class="button_blue" onclick="Multi_Select.selectMoreTip(this,'{{id}}');" value="提交"/>
								</span>
							{{/if}}
							</div>
						</form>
						{{/if_eq}}
					</div>
					<div class="btnRight">
						<em id="btnMultiSel{{id}}" class="btnRight1" value="{{moreFlag}}" onclick="Multi_Select.changeMuliSelectMode(this,'{{id}}',1);">+多选</em>
						<em id="btnSingleSel{{id}}" class="btnRight1" value="{{moreFlag}}" onclick="Multi_Select.changeMuliSelectMode(this,'{{id}}',2);" style="display: none">-单选</em>
						{{#if_eq moreFlag compare="1"}}
						<em id="btnMoreSel{{id}}" class="btnRight2" value="{{moreFlag}}" onclick="Multi_Select.changeMuliShowMode(this,'{{id}}',1);">更多</em>
						<em id="btnLessSel{{id}}" class="btnRight2" value="{{moreFlag}}" onclick="Multi_Select.changeMuliShowMode(this,'{{id}}',2);" style="display: none">收回</em>
						{{/if_eq}}
					</div>
				{{/if_eq}}
				<!-- 文本框 -->
				{{#if_eq displayCode compare="3"}}
					<div style="display: ">
					<form>
						<label>
							<input id="input{{id}}" type="text" value="" />
						</label>
						<label>
							<input type="button" class="button_blue" onclick="Multi_Select.submitSingleInput('input{{id}}','{{id}}');" value="提交"/>
							<input type="button" class="button_blue" onclick="$('#input{{id}}').val('');" value="清空"/>
						</label>
					</form> 
					</div>
				{{/if_eq}}
				<!-- 单个时间 -->
				{{#if_eq displayCode compare="4"}}
					<div style="display: ">
					<form>
						<label>
							<input id="singleDate{{id}}" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  
								class="Wdate" style="width: 150px"/>
						</label>
						<label>
							<input type="button" class="button_blue" onclick="Multi_Select.submitSingleInput('singleDate{{id}}','{{id}}');" value="提交"/>
							<input type="button" class="button_blue" onclick="$('#singleDate{{id}}').val('');" value="清空"/>
						</label>
					</form>
					</div>
				{{/if_eq}}
				<!-- 时间范围 -->
				{{#if_eq displayCode compare="5"}}
					<div style="display: ">
					<form>
						<label>
							<input id="startDate{{id}}" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  
								class="Wdate" value="" style="width: 150px"/>至
							<input id="endDate{{id}}" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
								class="Wdate" style="width: 150px"/>
						</label>
						<label>
							<input type="button" class="button_blue" onclick="Multi_Select.submitDateInput('{{id}}');" value="提交"/>
							<input type="button" class="button_blue" onclick="$('#startDate{{id}}').val('');$('#endDate{{id}}').val('');" value="清空"/>
						</label>
					</form> 
					</div>
				{{/if_eq}}
			</li>
		{{/each}}
	{{/if}}
</script>
</body>
<#include "dev/tpl/common/common_js.tpl" />
<#include "dev/tpl/indexMarket/indexMarket_js.tpl" />

</html>
